<script setup>
import { onMounted, onUnmounted, ref } from 'vue';
import { EventBus } from '@/views/game/EventBus';
import StartGame from '@/views/game/game02/Main'

const scene = ref();
const game = ref();

onMounted(() => {
    // 启动game
    game.value = StartGame('game-container-02');
});

onUnmounted(() => {

    if (game.value)
    {
        game.value.destroy(true);
        game.value = null;
    }

});

defineExpose({ scene, game });

</script>
<template>
  <div id="game-container-02"></div>
</template>

